<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta name="layout" content="mobile">
    <title>Upgrade Requests</title>
  </head>
  <body>
    <h1>Upgrade Requests</h1>
    <table>
      <tr>
        <th>Username</th>
        <th>Role</th>
        <th>Upgrade</th>
      </tr>
      <g:each var="request" in="${requestList}">
        <tr>
          <td>${request.user.username}</td>
          <td>${request.role.authority}</td>
          <td>
            <g:form action="upgradeUser">
              <g:hiddenField name="username" value="${request.user.username}"/>
              <g:hiddenField name="role" value="${request.role.authority}"/>
              <g:submitButton name="button" value="Upgrade" data-icon="plus"/>
            </g:form>
          </td>
        </tr>
      </g:each>
    </table>
    <g:form action="view">
      <g:submitButton name="button" value="User Page" data-icon="back"/>
    </g:form>
  </body>
</html>
